<?php
require_once(CMF_MODEL_PATH . 'table_model.php');

class Field_test_model extends Table_model{
	function Field_test_model(){
		parent::Table_model();
		$this->ci->load->model('Generic_table');
		
		$this->table = 'field_test';
		$this->table_name = 'CMF Test';
		$this->id_field = 'id';
		$this->fields = array(
			'id'			=> array(
								'name' 		=> 'ID',
								'view'		=> false,
								'edit'		=> array( 
												'func' 		=> 'form_hidden',
												'params'	=> null,
												'label'		=> false,
												'hidden'	=> true
											)
							),
			'character'		=> array(
								'name' 	=> 'Character',
								'view'	=> true,
								'sort'	=> true,
								'edit'	=> array(
											'func'		=> array('Form_wrapper', 'form_input_wrapper'),
											'params'	=> array( array('id' => 'character') ),
											'label'		=> true
										),
								'rules'	=> 'trim|required'
							),
			'date'			=> array(
								'name' 	=> 'Date',
								'view'	=> true,
								'sort'	=> true,
								'edit'	=> array(
											'func'		=> array('Form_wrapper', 'form_input_wrapper'),
											'params'	=> array( array('id' => 'date', 'class' => 'calendar') ),
											'label'		=> true
										),
								'rules'	=> 'trim|required'
							),
			'text'		=> array(
								'name'	=> 'Text',
								'view'	=> false,
								'edit'	=> array(
											'func' 		=> array('Form_wrapper', 'form_textarea_wrapper'),
											'params'	=> array(
																array(
																	'id' => 'text',
																	'rows'	=> '20',
																	'cols'	=> '40'
																	)
																),
											'label'		=> true
										),
								'rules'		=> 'required'
							),
			'rich_text'		=> array(
								'name'	=> 'Rich Text',
								'view'	=> false,
								'edit'	=> array(
											'func' 		=> array('Form_wrapper', 'form_textarea_wrapper'),
											'params'	=> array(
																array(
																	'id' => 'project_industry_text',
																	'class'			=> 'rte',
																	'rte_config'	=> '',
																	'rte_toolbar'	=> 'Basic',
																	'rows'	=> '20',
																	'cols'	=> '40'
																	)
																),
											'label'		=> true
										),
								'rules'		=> 'required'
							)
		);	
	}
}
?>
